function onLoad() {
    require(["css!../user/css/index.css"]);
    require(["html-header", "pointBackground", "css!../css/debug.css"]);
    initIndex();
}


function initIndex() {
    $("#changeLineDisplay").trigger("click");
    require(["html-header"], function(hh) {
        let timer = setInterval(() => {
            let app = hh.getVueApp();
            try {
                $("#userName").text(app.user.nick);
                $("#signMark").text(app.user.href);
                $("#headImage").attr("src", app.user.headimage);
                clearInterval(timer);
            } catch (ex) {}
        }, 2000);
    });
    $("#logout").on("click", () => {
        if (confirm("你确定要退出登录吗？")) {
            $.get("./logout", null, (data) => {
                window.location = "../";
            })
        }
    })
}
